import React from "react";
import { observer, ReactFC } from "../../packages/formily-reactive-react/src";
import { DroppableWidget } from "../../packages/designable-react/src";
import "./styles.less";

export const Container: ReactFC = observer((props) => {
  return <DroppableWidget>{props.children}</DroppableWidget>;
});

export const withContainer = (Target: React.JSXElementConstructor<any>) => {
  return (props: any) => {
    return (
      <DroppableWidget>
        <Target {...props} />
      </DroppableWidget>
    );
  };
};
